# 秒转小时分钟
import math

day = 86400
# total = long(input())
total = int(input())

total = total % 86400

# 向上取整 ceil、向下取整 floor、四舍五入 round, 第二个参数表示保留的小数位数
hours = math.floor(total/3600)
minutes = math.floor((total - 3600*hours)/60)
seconds = total - 3600*hours - 60*minutes

print('{0} : {1} : {2}'.format(hours, minutes, seconds))